
		//修改律师信息窗口
		var modifyWin;
		//待修改的律师信息form对象
		var modifyLawInfo;
		//接收源文件里面的存储器
		var stores;

		//修改律师信息函数
		function modifyLawyerInfo(grid,store){
			stores=store;
		var record = grid.getSelectionModel().getSelected();
        if (!record) {
           Ext.MessageBox.alert('修改操作','请选择要修改的一项！');
        } else {
	        	//修改律师信息窗口
	            myFormWin();
	            //加载原始数据
                Ext.getCmp("lawyerid").setValue(record.get("lawyerid"));
            	Ext.getCmp("lawyername").setValue(record.get("lawyername"));
            	Ext.getCmp("birthtime").setValue(record.get("birthtime"));
            	Ext.getCmp("lawyersex").setValue(record.get("lawyersex"));
            	Ext.getCmp("politicalstatus").setValue(record.get("politicalstatus"));
            	Ext.getCmp("businessnumber").setValue(record.get("businessnumber"));
            	Ext.getCmp("honestarchives").setValue(record.get("honestarchives"));
            	Ext.getCmp("lawyerphone").setValue(record.get("lawyerphone"));
            	Ext.getCmp("educationallevel").setValue(record.get("educationallevel"));
            	Ext.getCmp("identitynumber").setValue(record.get("identitynumber"));
            	Ext.getCmp("annsurreginfo").setValue(record.get("annsurreginfo"));
            	Ext.getCmp("positionname").setValue(record.get("positionname"));
            	Ext.getCmp("graduateschool").setValue(record.get("graduateschool"));
                Ext.getCmp("lawyeremail").setValue(record.get("lawyeremail"));
                 Ext.getCmp("lawyercometime").setValue(record.get("lawyercometime"));
                  Ext.getCmp("lawyerleavetime").setValue(record.get("lawyerleavetime"));
                   Ext.getCmp("lawyerachriveinfo").setValue(record.get("lawyerachriveinfo"));
                    Ext.getCmp("householdaddr").setValue(record.get("householdaddr"));
                     Ext.getCmp("achriveaddr").setValue(record.get("achriveaddr"));
                      Ext.getCmp("eligiblenumber").setValue(record.get("eligiblenumber"));
        }
		}

		//修改律师信息窗口
		var myFormWin = function() {
            modifyWin = new Ext.Window( {
                layout : 'fit',
                width : 800,
                height : 450,
                closeAction : 'hide',
                plain : true,
                title : '修改律师信息窗口',
                items : modifyLawInfo
            });
	         //显示窗口
	        modifyWin.show();
    	};

		//修改律师信息面板
	    modifyLawInfo = new Ext.FormPanel( {
	        collapsible : true,// 是否可以展开
	        labelWidth : 90,
	        labelAlign:'right',
			buttonAlign:'center',
	        frame : true,
	        bodyStyle : 'padding:5px 5px 0',
	        waitMsgTarget : true,
	        defaults : {
	            width :200
	        },
	        defaultType : 'textfield',
	        items : [
	        {
	        	xtype:'hidden',
	            name :'lawyerid',
	             id :'lawyerid'
	        },
	        {
	            fieldLabel : '律师姓名',
	            itemCls:'float-left',//向左浮动
				clearCls:'allow-float',//允许浮动
	            name :'lawyername',
	             id :'lawyername',
	            allowBlank :false
	        },
	        {
	                   fieldLabel :'出生年月',
						id :'birthtime',
						name :'birthtime',
						itemCls:'float-left',//向左浮动
						clearCls:'allow-float',//允许浮动
						allowBlank :true
	        },
	        {
	            fieldLabel : '性别',
	            itemCls:'float-left',//向左浮动
						clearCls:'allow-float',//允许浮动
	            name :'lawyersex',
	            id:"lawyersex",
	            allowBlank : false
	        },
	        {
	            fieldLabel : '政治面貌',
	            itemCls:'float-left',//向左浮动
						clearCls:'allow-float',//允许浮动
	            name :'politicalstatus',
	            id:"politicalstatus",
	            allowBlank : false
	        },
	        {
	            fieldLabel : '执业证号',
	            itemCls:'float-left',//向左浮动
						clearCls:'allow-float',//允许浮动
	            name :'businessnumber',
	            id:"businessnumber",
	            allowBlank : false
	        },
	         {
	            fieldLabel : '诚信档案',
	            itemCls:'float-left',//向左浮动
						clearCls:'allow-float',//允许浮动
	            name :'honestarchives',
	            id:"honestarchives",
	            allowBlank : false
	        },
	        {
	            fieldLabel : '联系方式',
	            itemCls:'float-left',//向左浮动
						clearCls:'allow-float',//允许浮动
	            name :'lawyerphone',
	            id:"lawyerphone",
	            allowBlank : false
	        },
	        {
	            fieldLabel : '文化程度',
	            itemCls:'float-left',//向左浮动
						clearCls:'allow-float',//允许浮动
	            name :'educationallevel',
	            id:"educationallevel",
	            allowBlank : false
	        },
	         {
	            fieldLabel : '身份证号',
	            itemCls:'float-left',//向左浮动
						clearCls:'allow-float',//允许浮动
	            name :'identitynumber',
	            id:"identitynumber",
	            allowBlank : false
	        },
	         {
	            fieldLabel : '年检注册情况',
	            itemCls:'float-left',//向左浮动
						clearCls:'allow-float',//允许浮动
	            name :'annsurreginfo',
	            id:"annsurreginfo",
	            allowBlank : false
	        },
	         {
	            fieldLabel : '职位名',
	            itemCls:'float-left',//向左浮动
						clearCls:'allow-float',//允许浮动
	            name :'positionname',
	            id:"positionname",
	            allowBlank : false
	        },
	         {
	            fieldLabel : '毕业院校',
	            itemCls:'float-left',//向左浮动
						clearCls:'allow-float',//允许浮动
	            name :'graduateschool',
	            id:"graduateschool",
	            allowBlank : false
	        },
	         {
	            fieldLabel : '邮箱',
	            itemCls:'float-left',//向左浮动
						clearCls:'allow-float',//允许浮动
	            name :'lawyeremail',
	            id:"lawyeremail",
	            allowBlank : false
	        },


	        {
	            fieldLabel : '入所时间',
	            itemCls:'float-left',//向左浮动
				clearCls:'allow-float',//允许浮动
	            name :'lawyercometime',
	            id:"lawyercometime",
	            allowBlank : false
	        },
	        {
	            fieldLabel : '离所时间',
	            itemCls:'float-left',//向左浮动
				clearCls:'allow-float',//允许浮动
	            name :'lawyerleavetime',
	            id:"lawyerleavetime",
	            allowBlank : false
	        },
	        {
	            fieldLabel : '异动情况',
	            itemCls:'float-left',//向左浮动
				clearCls:'allow-float',//允许浮动
	            name :'lawyerachriveinfo',
	            id:"lawyerachriveinfo",
	            allowBlank : false
	        },
	        {
	            fieldLabel : '户籍所在地',
	            itemCls:'float-left',//向左浮动
				clearCls:'allow-float',//允许浮动
	            name :'householdaddr',
	            id:"householdaddr",
	            allowBlank : false
	        },
	        {
	            fieldLabel : '档案所在地',
	            itemCls:'float-left',//向左浮动
				clearCls:'allow-float',//允许浮动
	            name :'achriveaddr',
	            id:"achriveaddr",
	            allowBlank : false
	        },
	        {
	            fieldLabel : '资格证号',
	            itemCls:'float-left',//向左浮动
				clearCls:'allow-float',//允许浮动
	            name :'eligiblenumber',
	            id:"eligiblenumber",
	            allowBlank : false
	        }
	        ],

	        buttons : [ {
	            text : '保存',
	            iconCls:'save',
	            disabled : false,
	            handler : function() {
	                if (modifyLawInfo.form.isValid()) {
	                    modifyLawInfo.form.submit( {
	                        url : 'ModifyLawyerInfo.jsj',
	                        success : function(from, action) {
	                         Ext.MessageBox.alert('保存成功', '修改律师信息成功！');
	                            stores.load( {
	                                params : {
	                                    start : 0,
	                                    limit : 5
	                                }
	                            });
	                            modifyWin.hide();
	                        },
	                        failure : function(form, action) {
	                           Ext.MessageBox.alert('保存失败', '修改律师信息失败！');
	                        },
	                        waitMsg : '正在保存数据，稍后...'
	                    });
	                   // dialog.hide();
	                } else {
	                    Ext.Msg.alert('信息', '请填写完成再提交!');
	                }
	            }
	        }, {
	            text : '取消',
	            iconCls:'cancel',
	            handler : function() {
	                modifyWin.hide();
	            }
	        }]
    });